home *** CD-ROM | disk | FTP | other *** search
/ TPUG - Toronto PET Users Group / TPUG Users Group CD / TPUG Users Group CD.iso / C64 / A-Monthly Disks / (c)aaq.d64 / digger (.txt) < prev    next >
Commodore BASIC  |  2007-02-04  |  10KB  |  289 lines

  1. 2 CLR:POKE53281,0:POKE53280,8:PRINT"[147]"+CHR$(142):MINER=1278:BANK=500:G=500
  2. 3 BUY=0:GOSUB2000
  3. 4 FORL=1344TO1983:X=INT(2*RND(1))+1:IFX=1THENX=174
  4. 5 IFX=2THENX=160
  5. 6 POKEL,X:POKEL+54272,9:NEXT
  6. 7 FORL=1304TO1343:POKEL,102:POKEL+54272,12:NEXT
  7. 8 FORL=1984TO2023:POKEL,102:POKEL+54272,12:NEXT
  8. 9 FORL=1304TO1984STEP40:POKEL,102:POKEL+39,102:POKEL+54272,12:POKEL+54311,12
  9. 10 NEXT:PRINT"      [175][175][172][162][162][187][175][175] GOLD:$         [164][164][164][164][164][164][164]
  10. 11 [153]"      GET BANK ABS YOU HAVE:     (null)  (null) (null)LISTSPC(SPC(
  11. 12 PRINT"      [207][207][207][207][207][207][207][208] $             [163][163] [214] [212][155][166][166]
  12. 13 [153]"      (null)USRUSRUSRUSRUSRUSR(null)                 SPC(SPC(SPC(SPC(LISTSPC(SPC(
  13. 14 PRINT"      [204][175][175][175][175][175][175][186]                   [144]E[166][155][166][166]
  14. 15 [153]"SPC(SPC(SPC(SPC(LISTSPC(SPC(
  15. 16 FORL=1TO9:PRINT"[155][166]    [166][166][166][166]":NEXT
  16. 17 PRINT"    "
  17. 18 PRINT"[145][145][145] "
  18. 20 FORL=1TO17:POKEMINER,32:MINER=MINER+1:POKEMINER,88:POKEMINER+54272,1
  19. 30 FORA=1TO25:NEXT:NEXT
  20. 100 PRINT""
  21. 110 FORL=1TO10
  22. 115 PRINT" [214] [212]"
  23. 120 PRINT"[166][166][166][166]"
  24. 130 PRINT"[216]  [166]"
  25. 140 PRINT"[166][166][166][166]"
  26. 145 PRINT"[145][145][145]";:MINER=MINER+40
  27. 150 NEXT:MINER=MINER-40:BANK=BANK-25:MINER=1655:GOTO300
  28. 160 PRINT"":FORL=1TO10
  29. 170 PRINT"[166][166][166][166]"
  30. 180 PRINT"  [216][166]"
  31. 190 PRINT"[166][166][166][166]"
  32. 200 PRINT"    "
  33. 210 PRINT"[145][145][145][145][145]";:MINER=MINER-40:NEXT:MINER=MINER+40:FORL=1TO19
  34. 220 POKEMINER,32:MINER=MINER-1:POKEMINER,88:POKEMINER+54272,1
  35. 230 FORA=1TO25:NEXT:NEXT
  36. 240 PRINT"YOU HAVE "OUNCE"[157] OUNCES.":BANK=BANK+(G*OUNCE):OUNCE=0
  37. 250 FORL=1TO1000:NEXT
  38. 255 PRINT"                        "
  39. 260 FORL=1TO10:PRINT""BANK"[157]   "
  40. 265 PRINT""BANK"[157]   ":NEXT
  41. 299 BANK=BANK-25:GOTO20
  42. 300 REM MOVEMENT OF MINER
  43. 310 IFMINER=1657 THEN160
  44. 312 GETG$:IFG$<>""THEN318
  45. 313 A=INT(7*RND(1))+1:IFA=3THENGOSUB1200
  46. 314 IFBANK<0 THEN BANK=0:GOTO1300
  47. 315 PRINT""BANK"[157]   "
  48. 316 IFBANK>=30000 THEN 1500
  49. 317 POKE56322,0:J=PEEK(56320):T=JAND16:J=15-(JAND15):POKE56322,255:GOTO320
  50. 318 IFG$="/"ORG$="?"THEN20000
  51. 319 GOTO326
  52. 320 IFJ=1THENMOVE=-40:GOTO330
  53. 321 IFJ=2THENMOVE=+40:GOTO330
  54. 322 IFJ=4THENMOVE=-1:GOTO330
  55. 323 IFJ=8THENMOVE=+1:GOTO330
  56. 324 IFT=16  GOTO310
  57. 325 GOTO900
  58. 326 IFG$="B"THEN10000
  59. 327 IFG$="P"THEN1000
  60. 328 IFG$="Q"THEN1300
  61. 329 GOTO300
  62. 330 IFPEEK(MINER+MOVE)=230THENGOTO1000
  63. 331 IFPEEK(MINER+MOVE)=218THENGOTO300
  64. 332 IFPEEK(MINER+MOVE)=233THENGOTO300
  65. 333 IFPEEK(MINER+MOVE)=0THENGOTO300
  66. 334 IFPEEK(MINER+MOVE)=102THENGOTO300
  67. 340 IFPEEK(MINER+MOVE)=160THENGOTO400
  68. 341 IFPEEK(MINER+MOVE)=32 THENGOTO450
  69. 342 IFPEEK(MINER+MOVE)=174THENGOTO500
  70. 345 IFPEEK(MINER+MOVE)=19+128THEN600
  71. 346 IFPEEK(MINER+MOVE)=104+128THEN700
  72. 347 IFPEEK(MINER+MOVE)=6+128THEN800
  73. 349 IFPEEK(MINER+MOVE)=135THEN1100
  74. 400 FORL=1TO3:POKEMINER+MOVE,30:POKEMINER+MOVE+54272,1:POKE54296,1
  75. 405 POKE54296,0:FORA=1TO55:NEXT
  76. 410 POKEMINER+MOVE,31:POKEMINER+MOVE+54272,1:FORA=1TO55:NEXT:NEXT:BANK=BANK-5
  77. 450 POKEMINER,32:MINER=MINER+MOVE:POKEMINER,88:POKEMINER+54272,1
  78. 460 REM IDENTIFY NEXT BLOCK
  79. 500 REM IDENTIFY NEXT BLOCK
  80. 510 IFPEEK(MINER+MOVE)=160THEN599
  81. 511 IFPEEK(MINER+MOVE)=32THEN599
  82. 513 IFPEEK(MINER+MOVE)<>174THEN599
  83. 520 A=INT(10*RND(1))+1:IFA=1THENROCK=90 :ITEM$="SOLID ROCK AHEAD":GOTO540
  84. 521 IFA=2THENROCK=19:ITEM$="SPRING AHEAD":GOTO540
  85. 522 IFA=3THENROCK=105:ITEM$="SHALE ROCK":GOTO540
  86. 523 IFA=4THENROCK=104:ITEM$="SANDSTONE":GOTO540
  87. 524 IFA=5THENROCK=104:ITEM$="SANDSTONE":GOTO540
  88. 526 IFA=7THENROCK=90:ITEM$="SOLID ROCK AHEAD":GOTO540
  89. 527 IFA=8THENROCK=105:ITEM$="SHALE ROCK":GOTO540
  90. 528 IFA=9THENROCK=104:GOTO540
  91. 529 IFA=10THENROCK=19:ITEM$="SPRING AHEAD":GOTO540
  92. 530 IFA=6THEN ROCK=7:ITEM$="GOLD NUGGETS AHEAD!!"
  93. 540 POKEMINER+MOVE,ROCK+128:POKEMINER+MOVE+54272,3
  94. 541 IFPEEK(MINER+MOVE)=135THENPOKEMINER+MOVE+54272,7
  95. 545 PRINT""ITEM$:FORL=1TO600:NEXT:
  96. 550 PRINT"                                    "
  97. 599 GOTO300
  98. 600 REM FLOOD FROM SPRING
  99. 601 FORL=54272TO54296:POKEL,0:NEXT:POKE54296,15:POKE54277,190:POKE54278,200
  100. 602 FORL=15TO1STEP-1:POKE54273,37:POKE54272,160:POKE54276,129
  101. 603 POKE54273,17:POKE54272,230:POKE54276,129:NEXT
  102. 605 PRINT"SPRING-FLOODING!!!"
  103. 610 FORL=MINER+1TO2023:IFPEEK(L)=32THENPOKEL,0:POKEL+54272,14
  104. 620 NEXT
  105. 625 PRINT"                   "
  106. 626 OUNCE=0
  107. 627 PRINT"LOST ALL YOUR GOLD!!!":GOSUB799:GOSUB799:GOSUB799:GOSUB799
  108. 628 PRINT"                        "
  109. 699 POKE54296,0:GOTO300
  110. 700 REM CAVE IN FROM SANDSTONE
  111. 701 FORL=54272TO54296:POKEL,0:NEXT:POKE54296,15:POKE54277,190:POKE54278,200
  112. 702 FORL=15TO1STEP-1:POKE54273,37:POKE54272,160:POKE54276,129:POKE54296,L
  113. 703 NEXT:GOSUB4000
  114. 705 PRINT"SANDSTONE CAVE-IN"
  115. 706 GOSUB799:GOSUB799
  116. 710 IFPEEK(MINER-39)<>102THENPOKEMINER-39,232:POKEMINER-39+54272,3
  117. 720 IFPEEK(MINER+2)<>102THENPOKEMINER+2,232:POKEMINER+54272+2,3:GOSUB799
  118. 721 IFPEEK(MINER-41)<>102THENPOKEMINER-41,232:POKEMINER+54272-41,3:GOSUB4000
  119. 723 IFPEEK(MINER+39)<>102THENPOKEMINER+39,232:POKEMINER+54272+39,3:GOSUB799
  120. 724 IFPEEK(MINER+3)<>102THENPOKEMINER+3,232:POKEMINER+54272+3,3
  121. 795 OUNCE=0:POKE54276,128:POKE54296,0
  122. 796 PRINT"LOST ALL YOUR GOLD!!!":GOSUB799:GOSUB799:GOSUB799:GOSUB799
  123. 797 PRINT"                        "
  124. 798 GOTO300
  125. 799 FORL=1TO300:NEXT:RETURN
  126. 800 REM FOUND GOLD NUGGETS
  127. 899 GOTO300
  128. 900 REM DYNAMITE BLASTING
  129. 905 PRINT"DYNAMITE BLASTING"
  130. 906 IFMOVE=0THENMOVE=-1
  131. 907 FORL=54272TO54296:POKEL,0:NEXT:POKE54296,15:POKE54277,190:POKE54278,200
  132. 908 FORL=15TO1STEP-1:POKE54273,INT(255*RND(1))+1:POKE54272,INT(255*RND(1))+1
  133. 909 POKE54276,129:NEXT:GOSUB4000
  134. 910 IF(MINER+MOVE+MOVE)>1983THEN913
  135. 911 IF(MINER+MOVE+MOVE)<1344THEN913
  136. 912 IFPEEK(MINER+MOVE+MOVE)<>102THENPOKEMINER+MOVE+MOVE,32:FORL=1TO300:NEXT
  137. 913 IFPEEK(MINER+1)<>102THENPOKEMINER+1,32
  138. 915 IFPEEK(MINER-40)<>102THENPOKEMINER-40,32
  139. 916 IFPEEK(MINER-1)=102THEN918
  140. 917 POKEMINER-1,32
  141. 918 GOSUB4000:IFPEEK(MINER+40)<>102THENPOKEMINER+40,32
  142. 995 PRINT"                 "
  143. 999 POKE54296,0:BANK=BANK-200:GOTO300
  144. 1000 REM PUMPING WATER
  145. 1005 IFPEEK(MINER+MOVE)<>0THEN300
  146. 1010 PRINT"PUMPING WATER"
  147. 1020 FORL=1TO300:NEXT
  148. 1030 PRINT"                "
  149. 1099 BANK=BANK-100:GOTO400
  150. 1100 REM FOUND GOLD
  151. 1110 PRINT"FOUND GOLD!!!";
  152. 1115 NUGGS=INT(2*RND(1))+2:PRINT" "NUGGS"[157] OUNCES!!!":FORL=1TO500:NEXT
  153. 1120 OUNCE=OUNCE+NUGGS:PRINT"                               "
  154. 1130 GOTO450
  155. 1200 REM CHANGE PRICE OF GOLD
  156. 1210 A=INT(10*RND(1))+1:IFA=<5THENA=A-A-A
  157. 1211 IFA>5THENA=A-5
  158. 1215 G=G+(A):IFG<200THENG=200
  159. 1220 PRINT"$"G"[157]/OUNCE"
  160. 1230 RETURN
  161. 1300 REM BUST-END OF GAME
  162. 1305 IFBANK>0THEN1380
  163. 1310 PRINT""BANK"[157]   "
  164. 1320 PRINT"YOU RAN OUT OF MONEY!!!!  ":GOSUB799:GOSUB799:GOSUB799
  165. 1330 PRINT"TIME TO CLOSE THE MINE.       ":GOSUB799:GOSUB799:GOSUB799
  166. 1340 PRINT"PLAY AGAIN? (Y/N)           "
  167. 1345 PRINT"                            "
  168. 1346 PRINT"                            "
  169. 1347 PRINT"                            "
  170. 1350 GETG$:IFG$="Y"THENCLR:RUN
  171. 1360 IFG$<>"N"THEN1350
  172. 1370 GOTO1400
  173. 1380 PRINT"YOU WANT TO QUIT THE GAME? (Y/N)"
  174. 1381 GETG$:IFG$="Y"THENPRINT"PLAY AGAIN? (Y/N)[146]               ":GOTO1350
  175. 1382 IFG$<>"N"THEN1381
  176. 1383 PRINT"                                "
  177. 1384 GOTO300
  178. 1400 REM END STATEMENTS
  179. 1405 PRINT"[147]"
  180. 1410 GOTO5000
  181. 1500 REM WON GAME
  182. 1510 PRINT"YOU REACHED YOUR GOAL!!!  ":GOSUB799:GOSUB799:GOSUB799
  183. 1520 PRINT"YOU MADE OVER $30000!!!       ":GOSUB799:GOSUB799:GOSUB799
  184. 1530 PRINT"PLAY AGAIN? (Y/N)           "
  185. 1545 PRINT"                            "
  186. 1546 PRINT"                            "
  187. 1547 PRINT"                            "
  188. 1550 GOTO1350
  189. 2000 REM SET UP AND INSTRUCTIONS
  190. 2005 PRINT"  [175][185][175][164][175][185][175][164][175][185][175][164][175][185][175][164][175][185][175][164][175][185][175][164][175][185][175][164][175][185][175][164][175][185][175]"
  191. 2010 PRINT" [182]MINER-MINER-MINER-MINER-MINER-MINER[181]"
  192. 2020 PRINT"  [183][184][183][163][183][184][183][163][183][184][183][163][183][184][183][163][183][184][183][163][183][184][183][163][183][184][183][163][183][184][183][163][183][184][183]"
  193. 2021 PRINT"         COMMODORE-64 VERSION"
  194. 2022 PRINT"            BY IAN PHILLIPS"
  195. 2030 PRINT"  INSTRUCTIONS? (Y/N)"
  196. 2031 GETG$:IFG$="N"THEN3000
  197. 2032 IFG$<>"Y"THEN2031
  198. 2040 PRINT"[147]  YOU'RE SEARCHING FOR GOLD IN AN OLD "
  199. 2041 PRINT" MINE SHAFT. YOUR GOAL IS TO "
  200. 2044 PRINT" FIND $30,000 IN GOLD. WHEN YOU HAVE "
  201. 2045 PRINT" FOUND SOME GOLD ([158]G[146]) ENTER THE "
  202. 2046 PRINT" ELEVATOR AND YOU WILL MAKE A JOURNEY"
  203. 2047 PRINT" TO THE BANK-WHERE THE PRICE OF GOLD "
  204. 2048 PRINT" HAS BEEN CONSTANTLY CHANGING. SOUND"
  205. 2049 PRINT" EASY? WELL IT'S NOT.":GOSUB2080
  206. 2050 PRINT"[147]  YOU MAY FIND YOURSELF TRAPPED IN A "
  207. 2051 PRINT"SANDSTONE CAVE-IN, OR FLOODED BY A"
  208. 2052 PRINT"NATURAL SPRING.  IF THIS HAPPENS, YOU"
  209. 2053 PRINT"MAY LOSE ALL YOUR GOLD!!  YOU MAY FIND"
  210. 2054 PRINT"THAT YOU NEED TO BLAST THROUGH SOLID"
  211. 2055 PRINT"ROCK. TO USE DYNAMITE, PRESS THE FIRE-"
  212. 2056 PRINT"BUTTON ON YOUR JOYSTICK.  DYNAMITE CAN"
  213. 2060 PRINT"BLAST THROUGH ANYTHING, BUT IT COSTS"
  214. 2061 PRINT"$200!! IF THERE IS A FLOOD YOU WILL"
  215. 2062 PRINT"HAVE TO PUMP YOUR WAY OUT WITH THE"
  216. 2063 PRINT"P[146]-KEY. IT TOO COSTS MONEY! EACH SPACE"
  217. 2064 PRINT"YOU DIG COSTS MONEY. EACH RIDE ON THE"
  218. 2065 PRINT"ELEVATOR COSTS MONEY TOO!!":GOSUB2080:GOSUB2100
  219. 2070 PRINT"[147]  THE FOLLOWING SYMBOLS IDENTIFY THESE"
  220. 2071 PRINT"OBJECTS:"
  221. 2072 PRINT"         [158]G[146]- GOLD"
  222. 2073 PRINT"         [159]S[146]- SPRING"
  223. 2074 PRINT"         [159][168][146]- SANDSTONE"
  224. 2075 PRINT"         [159][218][146]- SOLID ROCK"
  225. 2076 PRINT"         [159][169][146]- SHALE ROCK"
  226. 2077 PRINT"         [154]@- WATER"
  227. 2079 GOSUB2080:GOTO2300
  228. 2080 PRINT" [158]      PRESS A KEY TO CONTINUE"
  229. 2085 GETG$:IFG$=""THEN2085
  230. 2090 RETURN
  231. 2100 PRINT"[147]  AT SOME POINT IN THE GAME YOU MAY"
  232. 2110 PRINT"  FIND THAT YOU WILL NOT MAKE THE "
  233. 2120 PRINT"  $30000.  WHEN MOST OF THE SCREEN HAS"
  234. 2130 PRINT"  BEEN CLEARED, OR WHEN THE GOING GETS"
  235. 2140 PRINT"  TOUGH, YOU CAN BUY SOME MORE LAND, "
  236. 2150 PRINT"  OR--GET A NEW SCREEN.  HOWEVER, THIS"
  237. 2160 PRINT"  WILL COST YOU 80% OF YOUR SAVINGS!!"
  238. 2170 PRINT"  THIS ALSO CAN BE DONE ANY  NUMBER"
  239. 2180 PRINT"  OF TIMES.  TO B[146]UY SOME NEW LAND,"
  240. 2190 PRINT"  PRESS B[146]--FOR B[146]UY."
  241. 2200 GOSUB2080:RETURN
  242. 2300 PRINT"[147] THESE ARE YOUR CONTROLS:"
  243. 2310 PRINT"     JOYSTICK IN PORT 2"
  244. 2320 PRINT"     FIREBUTTON-DYNAMITE"
  245. 2340 PRINT"     P         -PUMPS WATER"
  246. 2350 PRINT"     B         -BUYS NEW LAND"
  247. 2351 PRINT"     ?         -LISTS YOUR OPTIONS"
  248. 2360 PRINT"     Q         -QUIT THE GAME"
  249. 2370 GOSUB2080
  250. 3000 PRINT"[147]":RETURN
  251. 4000 REM -----SHAKE SCREEN--------
  252. 4010 POKE53265,PEEK(53265)AND247:POKE53270,PEEK(53270)AND247
  253. 4020 POKE53265,(PEEK(53265)AND248)+7:POKE53270,(PEEK(53270)AND248)+7:FORY=1TO9
  254. 4030 FORP=6TO0STEP-1:POKE53265,(PEEK(53265)AND248)+P
  255. 4040 POKE53270,(PEEK(53270)ANDINT(247*RND(1))+1)+P:FORX=1TO50:NEXTX,Y
  256. 4050 POKE53270,PEEK(53270)OR8:POKE53265,PEEK(53265)OR8
  257. 4060 POKE52365,255:POKE53270,200
  258. 4070 RETURN
  259. 5000 REM --------END END END----------
  260. 5100 GOTO30000
  261. 10000 REM --BUY MORE LAND--
  262. 10001 GETJUNK$:IFJUNK$<>""THEN10001
  263. 10002 G$=""
  264. 10005 IFOUNCE=0THEN10010
  265. 10006 PRINT"  FIRST BRING YOUR GOLD TO THE BANK!!   ":FORL=1TO7000:NEXT
  266. 10007 PRINT"                                        "
  267. 10008 GETJUNK$:IFJUNK$<>""THEN10008
  268. 10009 GOTO300
  269. 10010 ZXC=INT(((80*BANK)/100)*1)/1
  270. 10015 PRINT"IT'LL COST YOU $"ZXC"[157].":FORL=1TO4000:NEXT
  271. 10900 MINER=1278:BANK=BANK-ZXC+25:PRINT"[147]"
  272. 10901 GETJUNK$:IFJUNK$<>""THEN10901
  273. 10902 GOTO4
  274. 20000 REM LIST OPTIONS
  275. 21000 PRINT"FIRE-BUTTON[146] FOR DYNAMITE"
  276. 21010 FORL=1TO1000:NEXT
  277. 22000 PRINT"P[146] TO PUMP WATER         "
  278. 22010 FORL=1TO1000:NEXT
  279. 23000 PRINT"B[146] TO BUY NEW LAND"
  280. 23010 FORL=1TO1000:NEXT
  281. 24000 PRINT"Q[146] TO QUIT THIS GAME"
  282. 24010 FORL=1TO1000:NEXT
  283. 25000 PRINT"?[146] TO LIST OPTIONS  "
  284. 25010 FORL=1TO1000:NEXT
  285. 26000 PRINT"                       ":GOTO300
  286. 30000 POKE53265,(PEEK(53265)AND248)+3
  287. 30002 PRINT"[147]LOAD"CHR$(34)"HELLO"CHR$(34)",8":PRINT"RUN"
  288. 31000 POKE631,13:POKE632,13:POKE198,2
  289.